package cn.iocoder.yudao.module.paymember.controller.app.copying;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
import cn.iocoder.yudao.module.paymember.service.copying.PaymemberCopyingService;
import cn.iocoder.yudao.module.system.controller.admin.copying.vo.CopyingRespVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户（有关笔试） - 文案")
@RestController
@RequestMapping("/system/copying")
@Validated
public class AppCopyingController {

    @Resource
    private PaymemberCopyingService paymemberCopyingService;

    @GetMapping("/info")
    @Operation(summary = "获得文案信息")
    public CommonResult<CopyingRespVO> getCopyingInfo() {
        return success(paymemberCopyingService.getCopyingInfo(WebFrameworkUtils.getLoginUserId()));
    }

}